<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="../../WEB-INF/c.tld" prefix="c" %>

<div class="main">
	<div class="container">
	
	<c:if test="${error != null}">
			<div class="alert alert-error">
				<bean:message key="${error }" />
    		</div>
	</c:if>
	
	<html:form action="${action }" method="post" onsubmit="return validateAdminForm(this);" styleClass="form-horizontal">
		<fieldset>
			<legend><bean:message key="${mainTitle}" /></legend>
				<html:hidden property="idAdmin" value="${admin.idUser }" />
				<div class="control-group">
					<label class="control-label" for="lastname"><bean:message key="admin.Name" /></label>
					<div class="controls">
						<input type="text" name="lastname" size="16" maxlength="16" value="${admin.nom }" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="firstname"><bean:message key="admin.FirstName" /></label>
					<div class="controls">
						<input type="text" name="firstname" size="16" maxlength="16" value="${admin.prenom }" />
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="login"><bean:message key="admin.login" /></label>
						<div class="controls">
						<input type="text" name="login" size="16" maxlength="16" value="${admin.loginUtilisateur }" />
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="password"><bean:message key="admin.password" /></label>
						<div class="controls">
						<input type="password" name="password" size="16" maxlength="16" value="" />
					</div>
				</div>
				<div class="form-actions">
					<input type="hidden" name="idAdmin" value="${admin.idUser }">
					<button class="btn btn-primary" type="submit"><bean:message key="general.valider" /></button>
				</div>
		</fieldset>
		<html:javascript formName="AdminForm" />
	</html:form>
</div>
</div>

